#ifndef MENUSTATE_H_
#define MENUSTATE_H_

#include "GameState.h"
#include "Menu.h"
#include <string>

class MenuState : public GameState
{
public:
    MenuState(const std::string& header);
    virtual ~MenuState();
    virtual void init();

    virtual GraphicalElement* createGraphics();
    GameState* handleAnimationDone();

    virtual GameState* performMenuAction1();
    virtual GameState* performMenuAction2();
    virtual GameState* performMenuAction3();
    virtual GameState* performMenuActionEscape();
    virtual GameState* performMenuActionBackspace();
    virtual GameState* performMenuActionReturn();

    virtual GameState* handleEvent(const Event& event);

protected:
    virtual void addMenuLines() = 0;
    Text* addLine(const std::string& text);
    Text* addColorLine(const Color& color, const std::string& text);
    void clearMenu();

    Text* addInfoText(Text* text);
    GameState* goToNextState(GameState* nextState);

private:
    Menu* menu;
    GameState* nextState;
};

#endif
